﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Lamex.Library;
using Lamex.Interface;
using Lamex.Library.CommonClass;

namespace Lamex.mCapacity.UI
{
    public partial class frmCAP_Main : frmModuleBase
    {
        public frmCAP_Main()
        {
            InitializeComponent();
            menuStrip1.Text = ModuleNames.mCapacity; //与AssemblyModuleEntry.ModuleName定义相同
        }
        public override MenuStrip GetModuleMenu()
        {
            return this.menuStrip1;
        }

        private void menuCAP_Report_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("View_OP_Capacity_Optimized_Result", 0, false, true), sender as ToolStripMenuItem);
        }

        private void menuCAP_Analysis_Owed_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmCAP_Owed_Analysis_Summarize), sender as ToolStripMenuItem);
        }

        private void menuCAP_Analysis_Owed_Trending_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmCAP_Owed_Analysis_Trending), sender as ToolStripMenuItem);
        }

        private void menuCAP_Analysis_Plan_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmCAP_Owed_Production_Plan), sender as ToolStripMenuItem);
        }

        private void menuCAP_Factory_Workstation_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("OP_MGT_Factory_Workstation", 0, true, true), sender as ToolStripMenuItem);            
        }

        private void menuCAP_Process_Workers_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("OP_MGT_Workstation_Process", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuCAP_Production_Evaluate_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmCAP_Plan_Evaluation), sender as ToolStripMenuItem);
        }

        private void menuCAP_nonWorkHour_List_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("View_OP_Hour_Missing_List_Owed", 0, false, true), sender as ToolStripMenuItem);
        }

    }
}